package cn.gs.system.controller;

import cn.gs.common.controller.BaseController;
import cn.gs.common.dto.R;
import cn.gs.system.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author gs
 * @date 2020/1/10
 */
@RestController
@RequestMapping("/system/user")
public class UserController extends BaseController {



    @GetMapping("/info")
    public R info(){
        User user = getCurrentUser();
        Map<String, Object> map = new HashMap<>();
        map.put("id", user.getId());
        map.put("username", user.getUsername());
        return R.success(map);
    }

    @GetMapping("/getMenus")
    public R getMenus(String username){
        return null;
    }
}
